package vip.source.pattern.part07.improve;

import org.junit.jupiter.api.Test;
import vip.source.pattern.part07.improve.mode.impl.PayFaceMode;
import vip.source.pattern.part07.improve.mode.impl.PayFingerprintMode;
import vip.source.pattern.part07.improve.service.Pay;
import vip.source.pattern.part07.improve.service.impl.WxPay;
import vip.source.pattern.part07.improve.service.impl.ZfbPay;

import java.math.BigDecimal;

/** @Description: 测试桥接模式 @Author: zy */
public class UnitTest {
    @Test
    public void test_pay() {

        System.out.println("\r\n模拟测试场景；微信支付、人脸方式。");
        Pay wxPay = new WxPay(new PayFaceMode());
        wxPay.transfer("weixin_1092033111", "100000109893", new BigDecimal(100));

        System.out.println("\r\n模拟测试场景；支付宝支付、指纹方式。");
        Pay zfbPay = new ZfbPay(new PayFingerprintMode());
        zfbPay.transfer("jlu19dlxo111", "100000109894", new BigDecimal(100));
    }
}
